<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/commons/taglibs.jsp" %>
<!DOCTYPE HTML>
<html>
  <head>
  <title>wxUser列表</title>
  </head>
  <body>
 	<a class="btn-link pull-right"  href="javascript:syncWxUser()">同步微信</a>
 	<table class="table table-striped table-bordered table-hover" id="wxUserList">
 	<thead><tr>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td></td>
		 	<td>关注源</td>
		 	<td>公众号APPID</td>
		 	<td>公众号唯一ID</td>
 		<td>操作</td>
 	</tr>
 	</thead>
 	</table>
 	<script type="text/javascript" src="${ctx}/static/js/DataTables/js/jquery.dataTables.js"></script>
 	<script type="text/javascript" src="${ctx}/static/js/DataTables/js/jquery.dataTables_bootstrap.js"></script>
 	<script type="text/javascript" src="${ctx}/static/js/DataTables/js/dataTables.defaults.js"></script>
 	<link href="${ctx}/static/js/DataTables/css/dataTables.bootstrap.css" type="text/css" rel="stylesheet" />
 	<script type="text/javascript">
 		var table=null;
		$(function(){
			table=$("#wxUserList").DataTable({
			      "sAjaxSource": "${ctx}/wx3p/manage/${appId}/user/pageList",
			      "aoColumns": [
					 	 { "mData": "openid","sDefaultContent" : ""},
					 	 { "mData": "subscribe","sDefaultContent" : ""},
					 	 { "mData": "nickname","sDefaultContent" : ""},
					 	 { "mData": "sex","sDefaultContent" : ""},
					 	 { "mData": "language","sDefaultContent" : ""},
					 	 { "mData": "city","sDefaultContent" : ""},
					 	 { "mData": "province","sDefaultContent" : ""},
					 	 { "mData": "country","sDefaultContent" : ""},
					 	 { "mData": "headimgurl","sDefaultContent" : ""},
					 	 { "mData": "subscribeTime","sDefaultContent" : ""},
					 	 { "mData": "unsubscribeTime","sDefaultContent" : ""},
					 	 { "mData": "source","sDefaultContent" : ""},
					 	 { "mData": "appId","sDefaultContent" : ""},
					 	 { "mData": "unionId","sDefaultContent" : ""},
			        { "mData": "id",
			        	"mRender":function(data){
			        	var opt='<a href="javascript:alert(\'正在开发……\')">详情</a>';
				        	return opt;
	                   }
	                }
			      ]
			    });
		});
		function syncWxUser(){
			$.post("${ctx}/wx3p/manage/${appId}/user/syncWxUser",function(d){

			});
		}
 	</script>
  </body>
</html>
